﻿Public Class ClsTAccount
    Implements IList
    'T_Account(23)
    'AccountCode,PrevLevelCode,Level,AccountName,ShortName,FullName,
    'IfLastLevel,AccountType,YearMoney,BalanceDirection,YearCurrency,CurrencyCode,
    'IfRateAdjust,IfQuantity,QuantityUnit,YearQuantity,IfTrans,IfCustomer,
    'IfDepartment,IfEmployee,MonthTransit,MonthTransitAcctCode,AbSet

    Private m_AccountCode As String '0
    Private m_PrevLevelCode As String '1
    Private m_Level As Integer '2
    Private m_AccountName As String '3
    Private m_ShortName As String '4
    Private m_FullName As String '5
    Private m_IfLastLevel As Boolean '6
    Private m_AccountType As String   '7 表示科目类型：资产 损益 
    Private m_YearMoney As Decimal '8
    Private m_BalanceDirection As String '9
    Private m_YearCurrency As Decimal '10 年初外币
    Private m_CurrencyCode As String '11 年初外币数
    Private m_IfRateAdjust As Boolean  '12 是否调汇
    Private m_IfQuantity As Boolean '13 是否数量核算
    Private m_QuantityUnit As String '14 数量核算单位
    Private m_YearQuantity As Single '15 年初数量
    Private m_IfProject As Boolean ' 16 是否核算项目
    Private m_IfCustomer As Boolean '17 是否核算往来
    Private m_IfDepartment As Boolean '18 是否部门核算
    Private m_IfEmployee As Boolean '19 是否职员核算
    Private m_MonthTransit As String  '20 月末自动结转方式：借方结转 贷方结转 余额结转
    Private m_MonthTransitAcctCode As String '21 月末结转科目代码
    Private m_AbSet As Int16  '22 AB账设置 0 - 不分， 1- A 2-B -分属AB账

    Public Property AccountCode As String
        Get
            Return m_AccountCode
        End Get
        Set(value As String)
            m_AccountCode = value
        End Set
    End Property

    Public Property PrevLevelCode As String
        Get
            Return m_PrevLevelCode
        End Get
        Set(value As String)
            m_PrevLevelCode = value
        End Set
    End Property

    Public Property Level As Integer
        Get
            Return m_Level
        End Get
        Set(value As Integer)
            m_Level = value
        End Set
    End Property

    Public Property AccountName As String
        Get
            Return m_AccountName
        End Get
        Set(value As String)
            m_AccountName = value
        End Set
    End Property

    Public Property ShortName As String
        Get
            Return m_ShortName
        End Get
        Set(value As String)
            m_ShortName = value
        End Set
    End Property

    Public Property FullName As String
        Get
            Return m_FullName
        End Get
        Set(value As String)
            m_FullName = value
        End Set
    End Property

    Public Property IfLastLevel As Boolean
        Get
            Return m_IfLastLevel
        End Get
        Set(value As Boolean)
            m_IfLastLevel = value
        End Set
    End Property

    Public Property AccountType As String
        Get
            Return m_AccountType
        End Get
        Set(value As String)
            m_AccountType = value
        End Set
    End Property

    Public Property YearMoney As Decimal
        Get
            Return m_YearMoney
        End Get
        Set(value As Decimal)
            m_YearMoney = value
        End Set
    End Property

    Public Property BalanceDirection As String
        Get
            Return m_BalanceDirection
        End Get
        Set(value As String)
            m_BalanceDirection = value
        End Set
    End Property

    Public Property YearCurrency As Decimal
        Get
            Return m_YearCurrency
        End Get
        Set(value As Decimal)
            m_YearCurrency = value
        End Set
    End Property

    Public Property CurrencyCode As String
        Get
            Return m_CurrencyCode
        End Get
        Set(value As String)
            m_CurrencyCode = value
        End Set
    End Property

    Public Property IfRateAdjust As Boolean
        Get
            Return m_IfRateAdjust
        End Get
        Set(value As Boolean)
            m_IfRateAdjust = value
        End Set
    End Property

    Public Property IfQuantity As Boolean
        Get
            Return m_IfQuantity
        End Get
        Set(value As Boolean)
            m_IfQuantity = value
        End Set
    End Property

    Public Property QuantityUnit As String
        Get
            Return m_QuantityUnit
        End Get
        Set(value As String)
            m_QuantityUnit = value
        End Set
    End Property

    Public Property YearQuantity As Single
        Get
            Return m_YearQuantity
        End Get
        Set(value As Single)
            m_YearQuantity = value
        End Set
    End Property

    Public Property IfProject As Boolean
        Get
            Return m_IfProject
        End Get
        Set(value As Boolean)
            m_IfProject = value
        End Set
    End Property

    Public Property IfCustomer As Boolean
        Get
            Return m_IfCustomer
        End Get
        Set(value As Boolean)
            m_IfCustomer = value
        End Set
    End Property

    Public Property IfDepartment As Boolean
        Get
            Return m_IfDepartment
        End Get
        Set(value As Boolean)
            m_IfDepartment = value
        End Set
    End Property

    Public Property IfEmployee As Boolean
        Get
            Return m_IfEmployee
        End Get
        Set(value As Boolean)
            m_IfEmployee = value
        End Set
    End Property

    Public Property MonthTransit As String
        Get
            Return m_MonthTransit
        End Get
        Set(value As String)
            m_MonthTransit = value
        End Set
    End Property

    Public Property MonthTransitAcctCode As String
        Get
            Return m_MonthTransitAcctCode
        End Get
        Set(value As String)
            m_MonthTransitAcctCode = value
        End Set
    End Property

    Public Property AbSet As Int16
        Get
            Return m_AbSet
        End Get
        Set(value As Int16)
            m_AbSet = value
        End Set
    End Property

    Default Public Property Item(index As Integer) As Object Implements IList.Item
        Get
            'Throw New NotImplementedException()
            Select Case index
                Case 0
                    Return m_AccountCode
                Case 1
                    Return m_PrevLevelCode
                Case 2
                    Return m_Level
                Case 3
                    Return m_AccountName
                Case 4
                    Return m_ShortName
                Case 5
                    Return m_FullName
                Case 6
                    Return m_IfLastLevel
                Case 7
                    Return m_AccountType   '7 表示科目类型：资产 损益 
                Case 8
                    Return m_YearMoney
                Case 9
                    Return m_BalanceDirection
                Case 10
                    Return m_YearCurrency '10 年初外币
                Case 11
                    Return m_CurrencyCode '11 年初外币数
                Case 12
                    Return m_IfRateAdjust  '12 是否调汇
                Case 13
                    Return m_IfQuantity '13 是否数量核算
                Case 14
                    Return m_QuantityUnit '14 数量核算单位
                Case 15
                    Return m_YearQuantity  '15 年初数量
                Case 16
                    Return m_IfProject ' 16 是否核算项目
                Case 17
                    Return m_IfCustomer '17 是否核算往来
                Case 18
                    Return m_IfDepartment '18 是否部门核算
                Case 19
                    Return m_IfEmployee '19 是否职员核算
                Case 20
                    Return m_MonthTransit  '20 月末自动结转方式：借方结转 贷方结转 余额结转
                Case 21
                    Return m_MonthTransitAcctCode  '21 月末结转科目代码
                Case 22
                    Return m_AbSet  '22 AB账设置 0 - 不分， 1- A 2-B -分属AB账
                Case Else
                    Return Nothing
            End Select
        End Get
        Set(value As Object)
            'Throw New NotImplementedException()
            Select Case index
                Case 0
                    AccountCode = CType(value, String)
                Case 1
                    PrevLevelCode = CType(value, String)
                Case 2
                    Level = Integer.Parse(value)
                Case 3
                    AccountName = CType(value, String)
                Case 4
                    ShortName = CType(value, String)
                Case 5
                    FullName = CType(value, String)
                Case 6
                    IfLastLevel = CType(value, Boolean)
                Case 7
                    AccountType = CType(value, String)
                Case 8
                    YearMoney = CType(value, Decimal)
                Case 9
                    BalanceDirection = CType(value, String)
                Case 10
                    YearCurrency = Decimal.Parse(value)
                Case 11
                    CurrencyCode = CType(value, String)
                Case 12
                    IfRateAdjust = CType(value, Boolean)
                Case 13
                    IfQuantity = CType(value, Boolean)
                Case 14
                    QuantityUnit = CType(value, String)
                Case 15
                    YearQuantity = Single.Parse（value)
                Case 16
                    IfProject = CType(value, Boolean)
                Case 17
                    IfCustomer = CType(value, Boolean)
                Case 18
                    IfDepartment = CType(value, Boolean)
                Case 19
                    IfEmployee = CType(value, Boolean)
                Case 20
                    MonthTransit = CType(value, String)
                Case 21
                    MonthTransitAcctCode = CType(value, String)
                Case 22
                    AbSet = Integer.Parse(value)
            End Select

        End Set
    End Property

    Public ReadOnly Property IsReadOnly As Boolean Implements IList.IsReadOnly
        Get
            Throw New NotImplementedException()
        End Get
    End Property

    Public ReadOnly Property IsFixedSize As Boolean Implements IList.IsFixedSize
        Get
            Throw New NotImplementedException()
        End Get
    End Property

    Public ReadOnly Property Count As Integer Implements ICollection.Count
        Get
            'Throw New NotImplementedException()
            Return 23

        End Get
    End Property

    Public ReadOnly Property SyncRoot As Object Implements ICollection.SyncRoot
        Get
            Throw New NotImplementedException()
        End Get
    End Property

    Public ReadOnly Property IsSynchronized As Boolean Implements ICollection.IsSynchronized
        Get
            Throw New NotImplementedException()
        End Get
    End Property

    Public Sub Clear() Implements IList.Clear
        Throw New NotImplementedException()
    End Sub

    Public Sub Insert(index As Integer, value As Object) Implements IList.Insert
        Throw New NotImplementedException()
    End Sub

    Public Sub Remove(value As Object) Implements IList.Remove
        Throw New NotImplementedException()
    End Sub

    Public Sub RemoveAt(index As Integer) Implements IList.RemoveAt
        Throw New NotImplementedException()
    End Sub

    Public Sub CopyTo(array As Array, index As Integer) Implements ICollection.CopyTo
        Throw New NotImplementedException()
    End Sub

    Public Function Add(value As Object) As Integer Implements IList.Add
        Throw New NotImplementedException()
    End Function

    Public Function Contains(value As Object) As Boolean Implements IList.Contains
        Throw New NotImplementedException()
    End Function

    Public Function IndexOf(value As Object) As Integer Implements IList.IndexOf
        Throw New NotImplementedException()
    End Function

    Public Function GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator
        Throw New NotImplementedException()
    End Function
End Class
